home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 April: Mac OS SDK / Dev.CD Apr 96 SDK / Dev.CD Apr 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc / Sample Code / Sample Editors⁄Viewers / Cappuccino / Source / CappuccinoGlobals.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-12-11  |  2.7 KB  |  110 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        CappuccinoGlobals.h
  3.  
  4.     Contains:    Cappuccino globals
  5.  
  6.     Written by:    Steve Smith and Troy Gaul
  7.  
  8.     Copyright:    © 1995 by Apple Computer, Inc., all rights reserved.
  9. */
  10.  
  11. #ifndef _CAPPUCCINOGLOBALS_
  12. #define _CAPPUCCINOGLOBALS_
  13.  
  14. // -- OpenDoc --
  15.  
  16. #ifndef _ODTYPES_
  17. #include <ODTypes.h>
  18. #endif
  19.  
  20. #ifndef SOM_Module_OpenDoc_StdDefs_defined
  21. #include <StdDefs.h>
  22. #endif
  23.  
  24. #ifndef _ITEXT_
  25. #include <IText.h>
  26. #endif
  27.  
  28. // -- MacToolbox --
  29.  
  30. #ifndef __TYPES__
  31. #include <Types.h>
  32. #endif
  33.  
  34. //==============================================================================
  35. // Globals
  36. //==============================================================================
  37.  
  38. //------------------------------------------------------------------------------
  39. // Forward declarations
  40. //------------------------------------------------------------------------------
  41. struct CappuccinoGlobals;
  42. class ODMenuBar;
  43. class ODFocusSet;
  44. class CPromiseSet;
  45.  
  46. //------------------------------------------------------------------------------
  47. // Externs
  48. //------------------------------------------------------------------------------
  49. extern    ODUShort            gGlobalsUsageCount;
  50. extern    CappuccinoGlobals*    gGlobals;
  51.  
  52. //------------------------------------------------------------------------------
  53. // CappuccinoGlobals
  54. //------------------------------------------------------------------------------
  55. struct CappuccinoGlobals 
  56. {
  57.     CappuccinoGlobals();
  58.     
  59.     ODMenuBar*        fMenuBar;
  60.     ODFocusSet*        fUIFocusSet;    
  61.     Handle            fThumbnail;
  62.                 
  63.     ODTypeToken        fSelectionFocus;
  64.     ODTypeToken        fMenuFocus;
  65.     ODTypeToken        fModalFocus;
  66.     ODTypeToken        fFrameView;
  67.     ODTypeToken        fLargeIconView;
  68.     ODTypeToken        fSmallIconView;
  69.     ODTypeToken        fThumbnailView;
  70.     ODTypeToken        fMainPresentation;
  71.     
  72.     ODValueType        fTextDataValueType;
  73.     ODValueType        fAppleHFSFlavorValueType;
  74.             
  75.     ODScriptCode    fEditorsScript;
  76.     ODLangCode        fEditorsLanguage;
  77.     
  78.     CPromiseSet*    fClipboardPromises;
  79.     CPromiseSet*    fDragPromises;
  80. };
  81.  
  82. //------------------------------------------------------------------------------
  83. // CappuccinoGlobals constructor
  84. //------------------------------------------------------------------------------
  85. inline CappuccinoGlobals::CappuccinoGlobals()
  86. {
  87.     fMenuBar            = kODNULL;
  88.     fUIFocusSet            = kODNULL;    
  89.     fThumbnail            = kODNULL;
  90.                 
  91.     fSelectionFocus        = kODNullTypeToken;
  92.     fMenuFocus            = kODNullTypeToken;
  93.     fModalFocus            = kODNullTypeToken;
  94.     fFrameView            = kODNullTypeToken;
  95.     fLargeIconView        = kODNullTypeToken;
  96.     fSmallIconView        = kODNullTypeToken;
  97.     fThumbnailView        = kODNullTypeToken;
  98.     fMainPresentation    = kODNullTypeToken;
  99.     
  100.     fTextDataValueType         = kODNULL;
  101.     fAppleHFSFlavorValueType = kODNULL;
  102.             
  103.     fEditorsScript        = 0;
  104.     fEditorsLanguage    = 0;
  105.     
  106.     fClipboardPromises    = kODNULL;
  107.     fDragPromises        = kODNULL;
  108. }
  109.  
  110. #endif